Refactor: Identify and address initial issues in Camera classes #34
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit includes several improvements and fixes to the visca_over_ip Camera and CachingCamera classes:
Camera.__init__error handling: Re-raisesViscaExceptionif clearing the camera's interface socket fails during initialization.Camera.reset_sequence_number: Ensures client-side sequence number is reset only if a confirmation response is received from the camera.Camera.get_focus_mode(): Corrected error handling for unknown or malformed responses, removing an unreachable code path.CachingCamera.__init__resilience: The constructor now handles potentialViscaExceptionwhen fetching the initial focus mode, allowing the object to be created by defaultingfocus_modetoNoneand printing a warning.camera.pyrelated to adjusting gain, shutter, iris, brightness, exposure, and aperture.Potential Issue Noted:
During the addition of docstrings, I observed that the methods
increase_white_balance_temperature,decrease_white_balance_temperature, andreset_white_balance_temperatureincamera.pyuse VISCA commands identical to those for red gain adjustment. This is likely a bug and requires further investigation to ensure correct camera operation for white balance temperature.